/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.banco;

import br.com.banco.entity.Conta;
import java.util.Date;

/**
 *
 * @author kaue-adm
 */
public class BancoImpl implements Banco {

    private ContaBusiness contaBusiness;
    private Logon logon;

    public BancoImpl(Conta conta) {
        this.contaBusiness = new ContaBusiness(conta);
    }

    public double consultaSaldo() {
        return contaBusiness.consultaSaldo();
    }

    public boolean efetuaDeposito(double valor) {
        return contaBusiness.efetuaDeposito(valor);
    }

    public boolean efetuaSaque(double valor) {
        return contaBusiness.efetuaSaque(valor);
    }

    public Extrato consultarExtratoPorPeriodo(Date inicio, Date fim) {
        return new Extrato().consultaPorPeriodo(inicio, fim);
    }

    public void autenticaConta(Conta conta) {
        logon.autenticaConta(conta);
    }
}
